<?php

if (!class_exists('dbaPermission')):

class cmsPermission {

  function cmsPermission ($permissions) {
      $this->permissions = $permissions;
      if (!xicsEdition(PRO_EDITION))
            $this->permissions = array(
                'view' => 'Y',
                'pub' => 'Y',
                'a' => 'Y',
                'del' => 'Y',
                'edit' => 'Y',
                'applevel' => 'Y',
                'filesystem' => 'Y'
            );
  }

  function view () {
     if ($this->permissions['view']=='Y') return true;
  }

  function publish () {
     if ($this->permissions['pub']=='Y') return true;
  }

  function add () {
     if ($this->permissions['a']=='Y') return true;
  }

  function delete () {
     if ($this->permissions['del']=='Y') return true;
  }

  function edit () {
     if ($this->permissions['edit']=='Y') return true;
  }

  function applevel () {
     if ($this->permissions['applevel']=='Y') return true;
  }

  function filesystem () {
     if ($this->permissions['filesystem']=='Y') return true;
  }

}

endif;

?>